using System;

namespace Touchmax
{
	public class OpVehicle
	{
		private int sequenceId;
		private string vehicleNo;
		private string vehicleType;
		private string madeBy;
		private string vehicleModel;
		private int year;
		private string engine;
		private string vin;
		private string isurance;
		private string isuranceCompany;
		private string remark;
		private string jobOrder;
		private string userId;
		private DateTime entryDate;
		private string status;
		private string color1;
		private string colorCode1;
		private string formula1;
		private string colorMatch1;
		private string color2;
		private string colorCode2;
		private string formula2;
		private string colorMatch2;

		public int SequenceId
		{
			get { return this.sequenceId; }
		}

		public string VehicleNo
		{
			get { return this.vehicleNo; }
			set { this.vehicleNo = value; }
		}

		public string VehicleType
		{
			get { return this.vehicleType; }
			set { this.vehicleType = value; }
		}

		public string MadeBy
		{
			get { return this.madeBy; }
			set { this.madeBy = value; }
		}

		public string VehicleModel
		{
			get { return this.vehicleModel; }
			set { this.vehicleModel = value; }
		}

		public int Year
		{
			get { return this.year; }
			set { this.year = value; }
		}

		public string Engine
		{
			get { return this.engine; }
			set { this.engine = value; }
		}

		public string Vin
		{
			get { return this.vin; }
			set { this.vin = value; }
		}

		public string Isurance
		{
			get { return this.isurance; }
			set { this.isurance = value; }
		}

		public string IsuranceCompany
		{
			get { return this.isuranceCompany; }
			set { this.isuranceCompany = value; }
		}

		public string Remark
		{
			get { return this.remark; }
			set { this.remark = value; }
		}

		public string JobOrder
		{
			get { return this.jobOrder; }
			set { this.jobOrder = value; }
		}

		public string UserId
		{
			get { return this.userId; }
			set { this.userId = value; }
		}

		public DateTime EntryDate
		{
			get { return this.entryDate; }
			set { this.entryDate = value; }
		}

		public string Status
		{
			get { return this.status; }
			set { this.status = value; }
		}

		public string Color1
		{
			get { return this.color1; }
			set { this.color1 = value; }
		}

		public string ColorCode1
		{
			get { return this.colorCode1; }
			set { this.colorCode1 = value; }
		}

		public string Formula1
		{
			get { return this.formula1; }
			set { this.formula1 = value; }
		}

		public string ColorMatch1
		{
			get { return this.colorMatch1; }
			set { this.colorMatch1 = value; }
		}

		public string Color2
		{
			get { return this.color2; }
			set { this.color2 = value; }
		}

		public string ColorCode2
		{
			get { return this.colorCode2; }
			set { this.colorCode2 = value; }
		}

		public string Formula2
		{
			get { return this.formula2; }
			set { this.formula2 = value; }
		}

		public string ColorMatch2
		{
			get { return this.colorMatch2; }
			set { this.colorMatch2 = value; }
		}

        public decimal Amount
        {
            get
            {
                decimal amt = 0;
                if (this.sequenceId != null && this.sequenceId > 0)
                {
                    string sql = "select sum(totamt) from opInvoiceDet where ItemId='" + this.sequenceId + "'";
                    amt = SafeValue.SafeDecimal(Touchmax.Manager.ORManager.ExecuteScalar(sql), 0);
                }
                return amt;
            }
        }
	}
}
